<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:comps="http://java.sun.com/jsf/composite/comps"
      xmlns:f="http://java.sun.com/jsf/core" >
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Alquila Cosas</title>
    </h:head>
    <h:body >
        <h:outputStylesheet library="css" name="layout.css" />
        <h:outputStylesheet library="css" name="menu.css" />
        <h:outputScript library="javascript" name="util.js" target="body" />
        <comps:loginDialog id="login" />
        <table id="form:panel" width="1024px" align="center" >
            <tr>
                <td id="title" colspan="3" >
                    <comps:logoBar />
                    <div style="position: absolute; right: 120px; top: 10px;">
                        <h:outputText value="Hola, #{login.usuario.nombre}" rendered="#{login.logueado}"
                                      style="font-size: 11px"/>
                    </div>
                </td>
            </tr>
            <td id="BarraMenu" colspan="3">
                <comps:menuBar />
            </td>    
            <tr>
            </tr>
            <tr>    
                <td valign="top" width="200" class="columnaIzq">
                    <ui:insert name="left" />
                    <ui:repeat value="#{mostrarPublicidad.publicidadesIzq}" var="pub" >
                        <a href="#{pub.url}" target="blank" title="#{pub.caption}" >
                            <f:attribute name="url" value="#{pub.url}" />
                            <h:graphicImage value="/imagenpub?id=#{pub.id}" width="140"
                                            alt="#{pub.caption}" style="margin-top: 10px"/>
                        </a>
                    </ui:repeat>
                    <p:outputPanel rendered="#{empty mostrarPublicidad.publicidadesIzq}" >        
                        <h:link outcome="/vistas/comoPublicitar" >
                            <h:graphicImage value="#{resource['images:publicidadLateral.png']}" 
                                            style="margin-top: 10px"/>
                        </h:link>
                    </p:outputPanel>
                </td>
                <td id="principal" valign="top" >
                    <ui:insert name="principal"/>
                    <div style="height: 50px; width: 100%; position: relative" />
                </td>
            </tr>
            <tr>
                <td>
                    <div id="footer"/>
                </td>
            </tr>
        </table>
    </h:body>
</html>
